<extend name="Base/common"/>
<block name="body">
    <!-- 标签页导航 -->
    <div class="span9 page_message">
        <section id="contents">
            <include file="Addons/_nav"/>
            <div class="tab-content">
                <!-- 表单 -->
                <form id="form" action="{:U('oneKeyUpdate')}" method="post" class="form-horizontal form-center">
                    <label class="item-label">
                        会员昵称
                    </label>
                    <input type="text" class="text input-medium" value="{$user['nickname']}" disabled
                           style="background: #f0f0f0;width: 232px;">

                    <label class="item-label">
                        <span class="need_flag">*</span>
                        管理员到期日期
                    </label>
                    <input type="datetime" name="adminValidDate" class="text input-medium date" placeholder="请选择日期"/>


                    <div class="form-item cf">
                        <input type="hidden" name="id" value="{$user.id}">
                        <button class="btn submit-btn ajax-post" id="submit" type="submit"
                                target-form="form-horizontal">升级为店管理员
                        </button>
                    </div>
                </form>
                <include file="Addons/weixinPreview"/>
            </div>
        </section>
    </div>
</block>

<block name="script">
    <link href="__STATIC__/datetimepicker/css/datetimepicker.css?v={:SITE_VERSION}" rel="stylesheet" type="text/css">
    <php>if(C('COLOR_STYLE')=='blue_color') echo '
        <link href="__STATIC__/datetimepicker/css/datetimepicker_blue.css?v={:SITE_VERSION}" rel="stylesheet"
              type="text/css">
        ';
    </php>
    <link href="__STATIC__/datetimepicker/css/dropdown.css?v={:SITE_VERSION}" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
    <script type="text/javascript"
            src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js?v={:SITE_VERSION}"
            charset="UTF-8"></script>

    <script type="text/javascript">
        $('#submit').click(function () {
            $('#form').submit();
        });

        $(function () {
            $('.time').datetimepicker({
                format: 'yyyy-mm-dd hh:ii',
                language: "zh-CN",
                minView: 0,
                autoclose: true
            });
            $('.date').datetimepicker({
                format: 'yyyy-mm-dd',
                language: "zh-CN",
                minView: 2,
                autoclose: true
            });
            showTab();

            $('.toggle-data').each(function () {
                var data = $(this).attr('toggle-data');
                if (data == '') return true;

                if ($(this).is(":selected") || $(this).is(":checked")) {
                    change_event(this)
                }
            });

            $('.toggle-data').bind("click", function () {
                change_event(this)
            });
        });
    </script>
</block>
